package com.ganmiao.enums;

import lombok.Getter;

/**
 * 状态常量
 */
@Getter
public enum StatusIntEnums {

    PENDING(0, "待处理"),
    NORMAL(1, "正常"),
    DELETE(9, "删除"),
    ;

    private Integer status;
    private String remark;

    StatusIntEnums(Integer status, String remark) {
        this.status = status;
        this.remark = remark;
    }

    public static StatusIntEnums getInstance(Integer status) {
        for (StatusIntEnums statusEnums : StatusIntEnums.values()) {
            if (statusEnums.status == status) {
                return statusEnums;
            }
        }
        return null;
    }
}
